/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import util.Utilization;

/**
 *
 * @author CUNEYT
 */
public class Resource {

    private String type;
    private double amount;

    public Resource(String typ, double amo) {
        this.type = typ;
        this.amount = amo;
    }

    public void add(double amount) {
        this.amount += amount;
    }

    public double getAmount() {
        return Utilization.formatDouble(amount);
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return type + ", " + getAmount();
    }
}
